﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ViewIndividualCallSummary.aspx.cs" EnableEventValidation="false" Inherits="carinsurance_ViewIndividualCallSummary" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
    <title>
        <%=GetGlobalResourceObject("General", "IndividualCallSummary")%>
        - GG-CRM - กล้วยๆ.com - Teledirect Thailand</title>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <h1>
        <asp:Label runat="server" Text="<%$Resources:General,IndividualCallSummary%>" ID="lblPageName"></asp:Label></h1>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" />
    <div class="bc2">
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>
    <div class="topdisplay pb10">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="flattable">
            <tr>
                <td width="80">
                    <%=GetGlobalResourceObject("CarInsurance", "ReportType")%>:
                </td>
                <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddlReportType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlReportType_SelectedIndexChanged">
                                <asp:ListItem Value="0" Text="<%$Resources:General,Monthly%>"></asp:ListItem>
                                <asp:ListItem Value="1" Selected="True" Text="<%$Resources:General,Daily%>"></asp:ListItem>
                                <asp:ListItem Value="2" Text="<%$Resources:General,Customize%>"></asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;<asp:Label ID="lblFromDate" runat="server"></asp:Label>
                            <asp:DropDownList ID="ddlDay1" runat="server" ToolTip="Choose Day">
                                <asp:ListItem Value="01">01</asp:ListItem>
                                <asp:ListItem Value="02">02</asp:ListItem>
                                <asp:ListItem Value="03">03</asp:ListItem>
                                <asp:ListItem Value="04">04</asp:ListItem>
                                <asp:ListItem Value="05">05</asp:ListItem>
                                <asp:ListItem Value="06">06</asp:ListItem>
                                <asp:ListItem Value="07">07</asp:ListItem>
                                <asp:ListItem Value="08">08</asp:ListItem>
                                <asp:ListItem Value="09">09</asp:ListItem>
                                <asp:ListItem Value="10">10</asp:ListItem>
                                <asp:ListItem Value="11">11</asp:ListItem>
                                <asp:ListItem Value="12">12</asp:ListItem>
                                <asp:ListItem Value="13">13</asp:ListItem>
                                <asp:ListItem Value="14">14</asp:ListItem>
                                <asp:ListItem Value="15">15</asp:ListItem>
                                <asp:ListItem Value="16">16</asp:ListItem>
                                <asp:ListItem Value="17">17</asp:ListItem>
                                <asp:ListItem Value="18">18</asp:ListItem>
                                <asp:ListItem Value="19">19</asp:ListItem>
                                <asp:ListItem Value="20">20</asp:ListItem>
                                <asp:ListItem Value="21">21</asp:ListItem>
                                <asp:ListItem Value="22">22</asp:ListItem>
                                <asp:ListItem Value="23">23</asp:ListItem>
                                <asp:ListItem Value="24">24</asp:ListItem>
                                <asp:ListItem Value="25">25</asp:ListItem>
                                <asp:ListItem Value="26">26</asp:ListItem>
                                <asp:ListItem Value="27">27</asp:ListItem>
                                <asp:ListItem Value="28">28</asp:ListItem>
                                <asp:ListItem Value="29">29</asp:ListItem>
                                <asp:ListItem Value="30">30</asp:ListItem>
                                <asp:ListItem Value="31">31</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlMonth1" runat="server">
                                <asp:ListItem Value="01">Jan</asp:ListItem>
                                <asp:ListItem Value="02">Feb</asp:ListItem>
                                <asp:ListItem Value="03">Mar</asp:ListItem>
                                <asp:ListItem Value="04">Apr</asp:ListItem>
                                <asp:ListItem Value="05">May</asp:ListItem>
                                <asp:ListItem Value="06">Jun</asp:ListItem>
                                <asp:ListItem Value="07">Jul</asp:ListItem>
                                <asp:ListItem Value="08">Aug</asp:ListItem>
                                <asp:ListItem Value="09">Sep</asp:ListItem>
                                <asp:ListItem Value="10">Oct</asp:ListItem>
                                <asp:ListItem Value="11">Nov</asp:ListItem>
                                <asp:ListItem Value="12">Dec</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlYear1" runat="server">
                                <asp:ListItem Value="2010">2010</asp:ListItem>
                                <asp:ListItem Value="2011">2011</asp:ListItem>
                                <asp:ListItem Value="2012">2012</asp:ListItem>
                                <asp:ListItem Value="2013">2013</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;
                            <asp:Label ID="lblToDate" runat="server"></asp:Label>
                            <asp:DropDownList ID="ddlDay2" runat="server" ToolTip="Choose Day">
                                <asp:ListItem Value="01">01</asp:ListItem>
                                <asp:ListItem Value="02">02</asp:ListItem>
                                <asp:ListItem Value="03">03</asp:ListItem>
                                <asp:ListItem Value="04">04</asp:ListItem>
                                <asp:ListItem Value="05">05</asp:ListItem>
                                <asp:ListItem Value="06">06</asp:ListItem>
                                <asp:ListItem Value="07">07</asp:ListItem>
                                <asp:ListItem Value="08">08</asp:ListItem>
                                <asp:ListItem Value="09">09</asp:ListItem>
                                <asp:ListItem Value="10">10</asp:ListItem>
                                <asp:ListItem Value="11">11</asp:ListItem>
                                <asp:ListItem Value="12">12</asp:ListItem>
                                <asp:ListItem Value="13">13</asp:ListItem>
                                <asp:ListItem Value="14">14</asp:ListItem>
                                <asp:ListItem Value="15">15</asp:ListItem>
                                <asp:ListItem Value="16">16</asp:ListItem>
                                <asp:ListItem Value="17">17</asp:ListItem>
                                <asp:ListItem Value="18">18</asp:ListItem>
                                <asp:ListItem Value="19">19</asp:ListItem>
                                <asp:ListItem Value="20">20</asp:ListItem>
                                <asp:ListItem Value="21">21</asp:ListItem>
                                <asp:ListItem Value="22">22</asp:ListItem>
                                <asp:ListItem Value="23">23</asp:ListItem>
                                <asp:ListItem Value="24">24</asp:ListItem>
                                <asp:ListItem Value="25">25</asp:ListItem>
                                <asp:ListItem Value="26">26</asp:ListItem>
                                <asp:ListItem Value="27">27</asp:ListItem>
                                <asp:ListItem Value="28">28</asp:ListItem>
                                <asp:ListItem Value="29">29</asp:ListItem>
                                <asp:ListItem Value="30">30</asp:ListItem>
                                <asp:ListItem Value="31">31</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlMonth2" runat="server">
                                <asp:ListItem Value="01">Jan</asp:ListItem>
                                <asp:ListItem Value="02">Feb</asp:ListItem>
                                <asp:ListItem Value="03">Mar</asp:ListItem>
                                <asp:ListItem Value="04">Apr</asp:ListItem>
                                <asp:ListItem Value="05">May</asp:ListItem>
                                <asp:ListItem Value="06">Jun</asp:ListItem>
                                <asp:ListItem Value="07">Jul</asp:ListItem>
                                <asp:ListItem Value="08">Aug</asp:ListItem>
                                <asp:ListItem Value="09">Sep</asp:ListItem>
                                <asp:ListItem Value="10">Oct</asp:ListItem>
                                <asp:ListItem Value="11">Nov</asp:ListItem>
                                <asp:ListItem Value="12">Dec</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlYear2" runat="server">
                                <asp:ListItem Value="2010">2010</asp:ListItem>
                                <asp:ListItem Value="2011">2011</asp:ListItem>
                                <asp:ListItem Value="2012">2012</asp:ListItem>
                                <asp:ListItem Value="2013">2013</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;
                            <%=GetGlobalResourceObject("General", "CallType")%>:
                            <asp:DropDownList runat="server" ID="ddlCallType" Width="120px">
                                <asp:ListItem Text="<%$Resources:General, All%>" Value="1" />
                                <asp:ListItem Text="<%$Resources:General, FirstFollowUpCall%>" Value="100" />
                                <asp:ListItem Text="<%$Resources:General, CallMeRequest%>" Value="101" />
                                <asp:ListItem Text="<%$Resources:General, CallMeBack%>" Value="102" />
                                <asp:ListItem Text="<%$Resources:General, CallDirect%>" Value="103" />
                            </asp:DropDownList>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td width="80">
                    <%=GetGlobalResourceObject("General", "Agent")%>
                </td>
                <td>
                    <asp:DropDownList ID="ddlAgentList" runat="server" Width="250px">
                    </asp:DropDownList>
                    <asp:Button ID="ibtSubmit" runat="server" Text="<%$Resources:General,Search%>" OnClick="ibtSubmit_Click"
                        CssClass="blueB ml10" />
                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:Label runat="server" ID="lblRecordCount" CssClass="red" />
        <asp:Button runat="server" Visible="false" ID="btnPrint" CssClass="greenB ml10" Text="<%$Resources:General,Print%>"
            OnClientClick="javascript:window.print();return false;" />
        <asp:Button ID="btnDownLoad" runat="server" Visible="false" CssClass="greenB ml10"
            Text="<%$Resources:General,GenerateBreakdownExcel%>" OnClick="btnDownLoad_Click" />
    </div>
    <div class="toggle">
        <asp:GridView ID="grvCallSummary" runat="server" AllowPaging="false" AutoGenerateColumns="False"
            CssClass="sTable" Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>"
            GridLines="None" OnSelectedIndexChanged="grvCallSummary_SelectedIndexChanged">
            <Columns>
                <asp:BoundField DataField="AgentName" HeaderText="<%$Resources:General,Broker%>"
                    SortExpression="AgentName" />
                <asp:BoundField DataField="CustomerName" HeaderText="<%$Resources:General,CustomerName%>"
                    SortExpression="CustomerName" Visible="false" />
                <asp:BoundField DataField="CarId" ItemStyle-BackColor="ActiveBorder" HeaderStyle-Font-Bold="true"
                    ItemStyle-Font-Bold="true" HeaderText="<%$Resources:General,CarId%>" SortExpression="CarId" />
                <asp:BoundField DataField="Mobile" ItemStyle-Font-Bold="true" HeaderText="<%$Resources:General,Mobile%>"
                    SortExpression="Mobile" Visible="false" />
                <asp:BoundField DataField="CallType" HeaderText="<%$Resources:General,CallType%>"
                    SortExpression="CallType" ItemStyle-Width="90px" />
                <asp:BoundField DataField="CallFinishCount" HeaderText="<%$Resources:General,CallFinishCount%>"
                    SortExpression="" Visible="false" />
                <asp:BoundField DataField="CallStatus" HeaderText="<%$Resources:General,CallStatus%>"
                    SortExpression="CallStatus" />
                <asp:BoundField DataField="CallDate" HeaderText="<%$Resources:General,CallDate%>"
                    SortExpression="CallDate" DataFormatString="{0:dd/MM/yyyy hh:mm tt}" />
            </Columns>
            <FooterStyle />
            <PagerStyle />
            <SelectedRowStyle />
            <HeaderStyle />
            <EditRowStyle />
            <AlternatingRowStyle />
            <RowStyle />
        </asp:GridView>
        <div style="display: none">
            <asp:TextBox ID="txtReportType" runat="server"></asp:TextBox>
            <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
            <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
            <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId"></asp:TextBox>
            <asp:Label ID="lblContent" runat="server"></asp:Label>
        </div>
    </div>
    <script type="text/jscript">
        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('callstatus')) {
                _retVal = confirm('Confirm to submit');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }
    </script>
</asp:Content>
